package com.java.mybatis.service.impl;

import com.java.mybatis.dao.OutboundDetailsDao;
import com.java.mybatis.entity.OutboundDetails;
import com.java.mybatis.service.OutboundDetailsServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class OutboundDetailsServicesImpl implements OutboundDetailsServices {
    @Autowired
    private OutboundDetailsDao outboundDetailsDao;
    /**
     * 添加
     * @param outboundDetails
     * @return
     */
    @Override
    public int addOutBoundDetails(OutboundDetails outboundDetails){
        return outboundDetailsDao.addOutBoundDetails(outboundDetails);
    }

    /**
     * 分页查询
     * @param page
     * @param pageSize
     * @return
     */
    public List<OutboundDetails> queryOutboundDetailsLimit(Integer page, Integer pageSize){
        return outboundDetailsDao.queryOutboundDetailsLimit(page, pageSize);
    }

    /**
     * 查询总条数
     * @return
     */
    public int queryOutboundDetailsCount(){
        return outboundDetailsDao.queryOutboundDetailsCount();
    }

    /**
     * 批号模糊查询
     * @param map
     * @return
     */
    @Override
    public List<OutboundDetails> queryOutboundDetailsLikeOutboundNumber(Map<String,Object> map){
        return outboundDetailsDao.queryOutboundDetailsLikeOutboundNumber(map);
    }

    /**
     * 货物名称模糊查询
     * @param map
     * @return
     */
    @Override
    public List<OutboundDetails> queryOutboundDetailsLikeGoodName(Map<String,Object> map){
        return outboundDetailsDao.queryOutboundDetailsLikeGoodName(map);
    }

    /**
     * 模糊查询总条数
     * @param str
     * @return
     */
    @Override
    public int queryOutboundDetailsLikeCount(String str){
        return outboundDetailsDao.queryOutboundDetailsLikeCount(str);
    }

    /**
     * 模糊查询总条数
     * @param str
     * @return
     */
    @Override
    public int queryOutboundDetailsLikeCount1(String str){
        return outboundDetailsDao.queryOutboundDetailsLikeCount1(str);
    }
}
